package com.ligong.mapper;

import com.ligong.domain.Page;
import com.ligong.domain.Users;

import java.util.List;

public interface UserMapper {

     /*<select id="selectOneById" parameterType="int" resultType="com.ligong.domain.Users">
    select * from  user where userId=#{id}

    </select>*/

    public Users selectOneById(int userId);

//1.如果实体类的属性名字和表的字段名不一致，怎么映射？

    //2.插入
    public int insertUser(Users user);

    //3.修改

    public int updateUser(Users user);


    //4.删除
    public int deleteUser(int userId);

    //5.模糊查询
    public List<Users> selectByLike(String name);

    //6.分页
    //自己分页
    public List<Users> selectByPageSelf(Page page);

    //7.关联查询

    //8.动态sql


}
